<template>
  <div class="page">
    <div class="list" v-for="(item,index) in cartData" :key="index">
      <section>{{item.title}}</section>
    </div>

    <div style="color:red">{{allCartGoodsNum}}</div>
  </div>
</template>

<script type="text/ecmascript-6">
import { mapState, mapGetters } from "vuex";
export default {
  computed: {
    ...mapState({ cartData: state => state.Cart.cartData }),
    ...mapGetters(["allCartGoodsNum"])
  },
  data() {
    return {};
  },
  components: {}
};
</script>

<style scoped lang="scss">
.list {
  height: 50px;
  border-bottom: 1px solid #ccc;
}
</style>
